
****INDIVIDUAL FORECASTS 
eststo clear

use "$jfqa_rep/21_DJIA_convexity_80.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

sort year month day

gen monthyear=ym(year, month)

drop if abs(dow_1m)>=.5

gen wret_1=(1+ret_5)*(1+ret_1)*(1+ret_2)*(1+ret_3)*(1+ret_4)-1
gen wret_2=(1+ret_10)*(1+ret_6)*(1+ret_7)*(1+ret_8)*(1+ret_9)-1
gen wret_3=(1+ret_15)*(1+ret_11)*(1+ret_12)*(1+ret_13)*(1+ret_14)-1
gen wret_4=(1+ret_20)*(1+ret_16)*(1+ret_17)*(1+ret_18)*(1+ret_19)-1
gen wret_5=(1+ret_25)*(1+ret_21)*(1+ret_22)*(1+ret_23)*(1+ret_24)-1
gen wret_6=(1+ret_30)*(1+ret_26)*(1+ret_27)*(1+ret_28)*(1+ret_29)-1
gen wret_7=(1+ret_35)*(1+ret_31)*(1+ret_32)*(1+ret_33)*(1+ret_34)-1
gen wret_8=(1+ret_40)*(1+ret_36)*(1+ret_37)*(1+ret_38)*(1+ret_39)-1
gen wret_9=(1+ret_45)*(1+ret_41)*(1+ret_42)*(1+ret_43)*(1+ret_44)-1
gen wret_10=(1+ret_50)*(1+ret_46)*(1+ret_47)*(1+ret_48)*(1+ret_49)-1
gen wret_11=(1+ret_55)*(1+ret_51)*(1+ret_52)*(1+ret_53)*(1+ret_54)-1
gen wret_12=(1+ret_60)*(1+ret_56)*(1+ret_57)*(1+ret_58)*(1+ret_59)-1
gen wret_13=(1+ret_65)*(1+ret_61)*(1+ret_62)*(1+ret_63)*(1+ret_64)-1
gen wret_14=(1+ret_70)*(1+ret_66)*(1+ret_67)*(1+ret_68)*(1+ret_69)-1
gen wret_15=(1+ret_75)*(1+ret_71)*(1+ret_72)*(1+ret_73)*(1+ret_74)-1
gen wret_16=(1+ret_80)*(1+ret_76)*(1+ret_77)*(1+ret_78)*(1+ret_79)-1

gen futwret_1=(1+futret_1)*(1+futret_2)*(1+futret_3)*(1+futret_4)*(1+futret_5)-1
gen futwret_2=(1+futret_6)*(1+futret_7)*(1+futret_8)*(1+futret_9)*(1+futret_10)-1
gen futwret_3=(1+futret_11)*(1+futret_12)*(1+futret_13)*(1+futret_14)*(1+futret_15)-1
gen futwret_4=(1+futret_16)*(1+futret_17)*(1+futret_18)*(1+futret_19)*(1+futret_20)-1
gen futmret_1=(1+futwret_1)*(1+futwret_2)*(1+futwret_3)*(1+futwret_4)*(1+futret_21)-1

collapse lag_convexity wret* dow_1m fut*, by(year month day monthyear)

gen obs=_n

gen fit_expect_16=.
tsset obs

*16 lags
forval i=500/2538 {	
nl (dow_1m = {b0} + ///
	{b1}*(({b2}*wret_1)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^2*wret_2)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^3*wret_3)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^4*wret_4)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^5*wret_5)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^6*wret_6)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^7*wret_7)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^8*wret_8)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^9*wret_9)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^10*wret_10)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^11*wret_11)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^12*wret_12)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^13*wret_13)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^14*wret_14)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^15*wret_15)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^16*wret_16)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16))) ///
		if obs<(`i'+1), initial(b0 0 b1 1 b2 0.5) nolog vce(cluster monthyear)
		
gen fit_expect =_b[/b0] + ///
	_b[/b1]*((_b[/b2]*wret_1)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^2*wret_2)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^3*wret_3)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^4*wret_4)/(_b[/b2]+_b[/b2]^2+_b[/b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[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^16*wret_16)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16)) if obs<(`i'+1) 
		
replace fit_expect_16=fit_expect if obs==`i'
drop fit_expect
}

drop if missing(fit_expect_16)

replace fit_expect_16=fit_expect_16*100
replace futmret_1=futmret_1*100
replace dow_1m=dow_1m*100

gen res_expect_16=dow_1m-fit_expect_16
egen res_expect_16_std=std(res_expect_16)
egen fit_expect_16_std=std(fit_expect_16)
egen dow_1m_std=std(dow_1m)
egen convex_std=std(lag_convexity)
}


****TABLE 10****
*coefficients and t-stats
newey futmret_1 dow_1m_std, lag(8)
newey futmret_1 fit_expect_16_std, lag(8)
newey futmret_1 res_expect_16_std, lag(8)

*R-squared
reg futmret_1 dow_1m_std
reg futmret_1 fit_expect_16_std
reg futmret_1 res_expect_16_std

****TABLE 11****
*coefficients and t-stats
newey dow_1m convex_std, lag(8)
newey fit_expect_16 convex_std, lag(8)
newey res_expect_16 convex_std, lag(8)

*R-squared
reg dow_1m convex_std
reg fit_expect_16 convex_std
reg res_expect_16 convex_std


****INSTITUTIONAL FORECASTS
use "$jfqa_rep/21_DJIA_convexity_80.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

sort year month day

gen monthyear=ym(year, month)

drop if year<1993

drop if abs(dow_1m)>=.5

gen wret_1=(1+ret_5)*(1+ret_1)*(1+ret_2)*(1+ret_3)*(1+ret_4)-1
gen wret_2=(1+ret_10)*(1+ret_6)*(1+ret_7)*(1+ret_8)*(1+ret_9)-1
gen wret_3=(1+ret_15)*(1+ret_11)*(1+ret_12)*(1+ret_13)*(1+ret_14)-1
gen wret_4=(1+ret_20)*(1+ret_16)*(1+ret_17)*(1+ret_18)*(1+ret_19)-1
gen wret_5=(1+ret_25)*(1+ret_21)*(1+ret_22)*(1+ret_23)*(1+ret_24)-1
gen wret_6=(1+ret_30)*(1+ret_26)*(1+ret_27)*(1+ret_28)*(1+ret_29)-1
gen wret_7=(1+ret_35)*(1+ret_31)*(1+ret_32)*(1+ret_33)*(1+ret_34)-1
gen wret_8=(1+ret_40)*(1+ret_36)*(1+ret_37)*(1+ret_38)*(1+ret_39)-1
gen wret_9=(1+ret_45)*(1+ret_41)*(1+ret_42)*(1+ret_43)*(1+ret_44)-1
gen wret_10=(1+ret_50)*(1+ret_46)*(1+ret_47)*(1+ret_48)*(1+ret_49)-1
gen wret_11=(1+ret_55)*(1+ret_51)*(1+ret_52)*(1+ret_53)*(1+ret_54)-1
gen wret_12=(1+ret_60)*(1+ret_56)*(1+ret_57)*(1+ret_58)*(1+ret_59)-1
gen wret_13=(1+ret_65)*(1+ret_61)*(1+ret_62)*(1+ret_63)*(1+ret_64)-1
gen wret_14=(1+ret_70)*(1+ret_66)*(1+ret_67)*(1+ret_68)*(1+ret_69)-1
gen wret_15=(1+ret_75)*(1+ret_71)*(1+ret_72)*(1+ret_73)*(1+ret_74)-1
gen wret_16=(1+ret_80)*(1+ret_76)*(1+ret_77)*(1+ret_78)*(1+ret_79)-1

gen futwret_1=(1+futret_1)*(1+futret_2)*(1+futret_3)*(1+futret_4)*(1+futret_5)-1
gen futwret_2=(1+futret_6)*(1+futret_7)*(1+futret_8)*(1+futret_9)*(1+futret_10)-1
gen futwret_3=(1+futret_11)*(1+futret_12)*(1+futret_13)*(1+futret_14)*(1+futret_15)-1
gen futwret_4=(1+futret_16)*(1+futret_17)*(1+futret_18)*(1+futret_19)*(1+futret_20)-1
gen futmret_1=(1+futwret_1)*(1+futwret_2)*(1+futwret_3)*(1+futwret_4)*(1+futret_21)-1

collapse lag_convexity wret* dow_1m fut*, by(year month day monthyear)

gen obs=_n

gen fit_expect_16=.
tsset obs

*16 lags
forval i=500/2529 {	
nl (dow_1m = {b0} + ///
	{b1}*(({b2}*wret_1)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^2*wret_2)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^3*wret_3)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^4*wret_4)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^5*wret_5)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^6*wret_6)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^7*wret_7)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^8*wret_8)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^9*wret_9)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^10*wret_10)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^11*wret_11)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^12*wret_12)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^13*wret_13)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^14*wret_14)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^15*wret_15)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^16*wret_16)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16))) ///
		if obs<(`i'+1), initial(b0 0 b1 1 b2 0.5) nolog vce(cluster monthyear)
		
gen fit_expect =_b[/b0] + ///
	_b[/b1]*((_b[/b2]*wret_1)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^2*wret_2)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^3*wret_3)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^4*wret_4)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^5*wret_5)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b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 
		
replace fit_expect_16=fit_expect if obs==`i'
drop fit_expect
}

drop if missing(fit_expect_16)

replace fit_expect_16=fit_expect_16*100
replace futmret_1=futmret_1*100
replace dow_1m=dow_1m*100

gen res_expect_16=dow_1m-fit_expect_16
egen res_expect_16_std=std(res_expect_16)
egen fit_expect_16_std=std(fit_expect_16)
egen dow_1m_std=std(dow_1m)
egen convex_std=std(lag_convexity)
}


****TABLE 10****
*coefficients and t-stats
newey futmret_1 dow_1m_std, lag(8)
newey futmret_1 fit_expect_16_std, lag(8)
newey futmret_1 res_expect_16_std, lag(8)

*R-squared
reg futmret_1 dow_1m_std
reg futmret_1 fit_expect_16_std
reg futmret_1 res_expect_16_std

****TABLE 11****
*coefficients and t-stats
newey dow_1m convex_std, lag(8)
newey fit_expect_16 convex_std, lag(8)
newey res_expect_16 convex_std, lag(8)

*R-squared
reg dow_1m convex_std
reg fit_expect_16 convex_std
reg res_expect_16 convex_std


****ALL FORECASTS 
eststo clear
use "$jfqa_rep/21_DJIA_convexity_80.dta", clear

qui{
merge 1:m year month day using "$jfqa_rep/Shiller_Inst_Ests.dta"
keep if _merge==3
drop _merge

preserve
tempfile copy

use "$jfqa_rep/21_DJIA_convexity_80.dta", clear

merge 1:m year month day using "$jfqa_rep/Shiller_Individual_Ests.dta"
keep if _merge==3
drop _merge

save `copy', replace

restore
append using `copy'

sort year month day

gen monthyear=ym(year, month)

drop if year<1993

drop if abs(dow_1m)>=.5

gen wret_1=(1+ret_5)*(1+ret_1)*(1+ret_2)*(1+ret_3)*(1+ret_4)-1
gen wret_2=(1+ret_10)*(1+ret_6)*(1+ret_7)*(1+ret_8)*(1+ret_9)-1
gen wret_3=(1+ret_15)*(1+ret_11)*(1+ret_12)*(1+ret_13)*(1+ret_14)-1
gen wret_4=(1+ret_20)*(1+ret_16)*(1+ret_17)*(1+ret_18)*(1+ret_19)-1
gen wret_5=(1+ret_25)*(1+ret_21)*(1+ret_22)*(1+ret_23)*(1+ret_24)-1
gen wret_6=(1+ret_30)*(1+ret_26)*(1+ret_27)*(1+ret_28)*(1+ret_29)-1
gen wret_7=(1+ret_35)*(1+ret_31)*(1+ret_32)*(1+ret_33)*(1+ret_34)-1
gen wret_8=(1+ret_40)*(1+ret_36)*(1+ret_37)*(1+ret_38)*(1+ret_39)-1
gen wret_9=(1+ret_45)*(1+ret_41)*(1+ret_42)*(1+ret_43)*(1+ret_44)-1
gen wret_10=(1+ret_50)*(1+ret_46)*(1+ret_47)*(1+ret_48)*(1+ret_49)-1
gen wret_11=(1+ret_55)*(1+ret_51)*(1+ret_52)*(1+ret_53)*(1+ret_54)-1
gen wret_12=(1+ret_60)*(1+ret_56)*(1+ret_57)*(1+ret_58)*(1+ret_59)-1
gen wret_13=(1+ret_65)*(1+ret_61)*(1+ret_62)*(1+ret_63)*(1+ret_64)-1
gen wret_14=(1+ret_70)*(1+ret_66)*(1+ret_67)*(1+ret_68)*(1+ret_69)-1
gen wret_15=(1+ret_75)*(1+ret_71)*(1+ret_72)*(1+ret_73)*(1+ret_74)-1
gen wret_16=(1+ret_80)*(1+ret_76)*(1+ret_77)*(1+ret_78)*(1+ret_79)-1

gen futwret_1=(1+futret_1)*(1+futret_2)*(1+futret_3)*(1+futret_4)*(1+futret_5)-1
gen futwret_2=(1+futret_6)*(1+futret_7)*(1+futret_8)*(1+futret_9)*(1+futret_10)-1
gen futwret_3=(1+futret_11)*(1+futret_12)*(1+futret_13)*(1+futret_14)*(1+futret_15)-1
gen futwret_4=(1+futret_16)*(1+futret_17)*(1+futret_18)*(1+futret_19)*(1+futret_20)-1
gen futmret_1=(1+futwret_1)*(1+futwret_2)*(1+futwret_3)*(1+futwret_4)*(1+futret_21)-1

collapse lag_convexity wret* dow_1m fut*, by(year month day monthyear)

gen obs=_n

gen fit_expect_16=.
tsset obs

*16 lags
forval i=700/3575 {	
nl (dow_1m = {b0} + ///
	{b1}*(({b2}*wret_1)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^2*wret_2)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^3*wret_3)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^4*wret_4)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^5*wret_5)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^6*wret_6)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^7*wret_7)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^8*wret_8)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^9*wret_9)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^10*wret_10)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^11*wret_11)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^12*wret_12)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^13*wret_13)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^14*wret_14)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^15*wret_15)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16) + ///
		({b2}^16*wret_16)/({b2}+{b2}^2+{b2}^3+{b2}^4+{b2}^5+{b2}^6+{b2}^7+{b2}^8+{b2}^9+{b2}^10+{b2}^11+{b2}^12+{b2}^13+{b2}^14+{b2}^15+{b2}^16))) ///
		if obs<(`i'+1), initial(b0 0 b1 1 b2 0.5) nolog vce(cluster monthyear)
		
gen fit_expect =_b[/b0] + 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[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^13*wret_13)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^14*wret_14)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^15*wret_15)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16) + ///
		(_b[/b2]^16*wret_16)/(_b[/b2]+_b[/b2]^2+_b[/b2]^3+_b[/b2]^4+_b[/b2]^5+_b[/b2]^6+_b[/b2]^7+_b[/b2]^8+_b[/b2]^9+_b[/b2]^10+_b[/b2]^11+_b[/b2]^12+_b[/b2]^13+_b[/b2]^14+_b[/b2]^15+_b[/b2]^16)) if obs<(`i'+1) 
		
replace fit_expect_16=fit_expect if obs==`i'
drop fit_expect
}

drop if missing(fit_expect_16)

replace fit_expect_16=fit_expect_16*100
replace futmret_1=futmret_1*100
replace dow_1m=dow_1m*100

gen res_expect_16=dow_1m-fit_expect_16
egen res_expect_16_std=std(res_expect_16)
egen fit_expect_16_std=std(fit_expect_16)
egen dow_1m_std=std(dow_1m)
egen convex_std=std(lag_convexity)
}


****TABLE 10****
*coefficients and t-stats
newey futmret_1 dow_1m_std, lag(8)
newey futmret_1 fit_expect_16_std, lag(8)
newey futmret_1 res_expect_16_std, lag(8)

*R-squared
reg futmret_1 dow_1m_std
reg futmret_1 fit_expect_16_std
reg futmret_1 res_expect_16_std

****TABLE 11****
*coefficients and t-stats
newey dow_1m convex_std, lag(8)
newey fit_expect_16 convex_std, lag(8)
newey res_expect_16 convex_std, lag(8)

*R-squared
reg dow_1m convex_std
reg fit_expect_16 convex_std
reg res_expect_16 convex_std

